package com.banana.scheduler;

import java.lang.reflect.InvocationTargetException;
import java.util.Properties;

public class JobScannerFactory {
	public static JobScanner createScanner(Properties prop) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SecurityException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
		Class c = Class.forName(prop.getProperty("scanner"));
		Object [] objList = new Object[1];
		objList[0] = prop;
		return (JobScanner) c.getConstructor(Properties.class).newInstance(objList);
	}
}
